﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="js/ext-base.js" type="text/javascript"></script>
    <script src="js/ext-all.js" type="text/javascript"></script>
    <link href="Styles/ext-all.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript">

         function showUrl(value) {
             return "<a href='http://" + value + "' target='_blank'>" + value + "</a>";
         }
         Ext.onReady(function () {

            
             var data = [
             [1,'EasyJweb','EasyJF','www.easyjf.com'],
             [2,'jfox','huihoo','www.easyjf.com'],
             [3,'jfox','huihoo','www.easyjf.com'],
             [4,'jfox','huihoo','www.easyjf.com'],
            ];
            var store=new Ext.data.SimpleStore(
            {
                data:data,
                fields:["id","name","org","url"]
            
            });
            var colM=new Ext.grid.ColumnModel(
            [{
                header:"colA",
                dataIndex:"name",
                sortable:true
            },
            {
                header:"colB",
                dataIndex:"org",
                sortable:true
            },
            {
                header:"colC",
                dataIndex:"url",
                renderer:showUrl
            }]
            );


            var grid=new Ext.grid.GridPanel({
                renderTo:"hello",
                title:"t1",
                height:200,
                width:600,
                cm:colM,
                store:store,
                autoExpandColumn:2
            
            });
            //store.load();
         });
         
      
     
      </script>
  
</head>
<body>
    <form id="form1" runat="server">
    <div>
     tttyyyyyyyyyyyyyyyyyyyyyyyy

    </div>
    </form>
</body>
</html>
